package com.gary;

/**
 * @author peng_rui
 * @date 2022/2/22
 */
public class LambdaTest {

    public static void main(String[] args) {
        Fun fun = x -> {
            System.out.println(x);
        };

        fun.fun("xxx");
        int a = 0;
        long b = Integer.MAX_VALUE;
        a = (int) b;
        System.out.println(a);

        float f = 1.0f;
        double d = Double.MAX_VALUE;
        float minF = Float.MIN_VALUE;
        double minD = Double.MIN_VALUE;
        f = (float) d;
        System.out.println(f);
        System.out.println(minF);
        System.out.println(minD);
    }
}

@FunctionalInterface
interface Fun {

    /**
     * fun
     * @param str
     */
    void fun(String str);
}
